Void and cluster apparatus and method for generating dither templates

ABSTRACT

An apparatus for dithering an input image to produce an output array for representation on an output device is described. The apparatus includes an input device to store input image pixels having a first plurality of chrominance or luminance levels; a dithering system including a dither template including an M by N matrix of integer threshold values, the uniform distribution of threshold values throughout the dither template possessing homogeneous attributes. The apparatus further includes a normalizer unit for normalizing the threshold values of the dither template for storage in a dither matrix according to the first plurality of chrominance or luminance levels of the input image pixels and a second plurality of chrominance or luminance levels of the output array and a summation unit to add the input image pixel chrominance or luminance values to the normalized threshold values of the dither matrix. A quantizer unit is provided to adjust summation unit output to a closest output array chrominance or luminance levels of an output device.

RELATED APPLICATIONS

The following application for a U.S. Patent is related to the presentapplication:

Inventor: Ulichney et al., Title: Imaging System with Multi-LevelDithering Using Two Memories, filed on even date with the presentapplication, U.S. Pat. No. 5,333,262 issued Jul. 6, 1994.

FIELD OF THE INVENTION

This invention relates generally to image processing, and moreparticularly to providing an output image through dithering which isperceptually similar to an input image using fewer chrominance orluminance levels than are used by the original input image.

BACKGROUND OF THE INVENTION

As it is known in the art, imaging systems are used to translate a giveninput image to an output image. For example, a computer screen mayregister a given input image which is subsequently transferred to anoutput device, such as a printer. A problem may exist when transferringa multi-level chrominance or luminance (color or brightness) input imageto an image generating output device because typical output devices arecapable of displaying fewer chrominance or luminance levels for eachpixel than are found in the input image.

Commonly, the effect of shading is achieved through digital halftoning,wherein each input level is simulated by varying the ratio of outputchrominance or luminance levels in a small area of the screen. Adrawback of digital halftoning is that visually sharp edges may be foundin a resultant output image due to neighboring output pixels withdifferent output chrominance or luminance levels. Dithering, which addsdistinct integer values to the each pixel, was introduced to alleviatethe sharp edges seen in halftoned output images. The conversion of aninput image pixel array to an output image pixel array using ditheringis well known in the art, see for example Robert A. Ulichneys DigitalHalftoning, MIT Press, 1987, Chapter 5.

Ordered dithering uses a dither matrix whose elements are integerthreshold values. The dither matrix is commonly smaller than the inputimage, and repeatedly laid down over the image in a periodic manner,thus tiling the input image. An example of a 4×4 dither matrix 250 tiledover a 16×16 input image 200 is shown in FIG. 1. Each element of thedither matrix 250 is an integer representing a threshold value. Forexample, with a bilevel output device, the threshold value determineswhether or not an input pixel at that location will be turned "on", i.e.a black pixel or "off", i.e. a white pixel When the input pixelchrominance or luminance value is greater than the threshold value, thepixel is turned "on", if the chrominance or luminance value of the pixelis less than or equal to the threshold value, the pixel is turned "off".For example, if the 16×16 input image in FIG. 1 had 16 possiblechrominance or luminance levels {0,1,2 . . . 15} for display on abilevel output device, a given pixel 210 would be black only if thechrominance or luminance value of the original pixel of the input image200 is greater than a 5, for example. Note that the highest threshold inthe dither matrix is 14, thus ensuring that all input pixels with anchrominance or luminance level of 15 (the highest possible chrominanceor luminance level in this example) will always be turned "on" in theoutput image. Because the dither matrix thresholds essentially determinewhich pixels of the input image will be displayed on the output device,the ordering of the threshold values in the dither matrix is related tothe quality of the output image.

Various ordered dithering methods for arranging threshold values withina dither matrix have been developed. One problem with these ordereddithering methods is that regular patterns appear in the output imagesdue to the tiling of the ordered dither matrix over the input image.This provides an output image which appears artificially processed. Inaddition, the ordered dither matrices tend to produce an output imagewith increased low frequency spatial characteristics. Low frequencyspatial characteristics in an output image introduce residual visualartifacts which diminish the quality of the output image.

One approach to overcome this problem is the use of randomness to breakup the rigid regularity of ordered dither. An example of the use ofrandomness is discussed by J. P. Allebach in 1976 in a paper entitledRandom Quasi-Periodic Halftone Process, J. Opt. Soc. Am., vol. 66, pp.909-917. Subsequent efforts by T. Mitsa and K. Parker are described inDigital Halftoning Using a Blue Noise Mask, Proc. SPIE, Image Proc.Algorithms and Techniques II, February 25-March 1, vol 1452, pp 47-56.Mitsa and Parker present a method to produce a "blue noise mask" ordereddither matrix for use in generating an output image with given spatialfrequency domain characteristics, mimicking the "blue noise" patternsachieved with a compute intensive error diffusion algorithm described byRobert A. Ulichney in Digital Halftoning, Chapter 8, MIT Press, 1987.However, one problem with Mitsa and Parker's approach is that thecomplex process of generating the "blue noise mask" increases hardwarecomplexity.

SUMMARY OF THE INVENTION

According to one aspect of the invention, an apparatus for dithering aninput image to produce an output array for representation on an outputdevice comprises an input device to store input image pixels having afirst plurality of chrominance or luminance levels; a dithering systemincluding a dither template comprising an M by N matrix of integerthreshold values, the uniform distribution of threshold valuesthroughout the dither template possessing homogeneous attributes; anormalizer unit for normalizing the threshold values of the dithertemplate for storage in a dither matrix according to the first pluralityof chrominance or luminance levels of the input image pixels and asecond plurality of chrominance or luminance levels of the output array;a summation unit to add the input image pixel chrominance or luminancevalues to the normalized threshold values of the dither matrix; and aquantizer unit to adjust summation unit output to a closest output arraychrominance or luminance level.

An improved method for ordering the threshold values of the dithertemplate includes the steps of providing a binary pattern array of firstand second type bit elements also having M by N locations and arearranging the bit elements in the array. In particular the step ofrearranging the bit elements includes the step of wrapping aroundindices of the bit elements to iteratively move the bit elements at theperipheries of the array to bit element locations within the patternarray until the pattern of bit elements is uniformly distributed, thatis, the first and second type bit elements are isotopically distributedin all directions. The selection of a bit for movement within thepattern array is dependant on the binary value of the bit and a spatialcharacteristic of the bit to all remaining bits of a predeterminedbinary value, for example with the binary value of "1". The spatialcharacteristic used in the selection process differs depending on thebinary value of the bit element.

For example, for each pattern array bit element having a value "0", therearrangement method locates the "0" bit element which has the lowestnumber of neighboring "1" bit elements. This "0" bit element is termedthe largest void location. In contrast, for each pattern array bitelement having a value "1", the rearrangement method locates the "1" bitelement with the highest number of neighboring "1" bit elements. This"1" bit element is termed the largest cluster location. Thus, therearrangement method moves the "1" bit element from the largest clusterlocation to the largest void location.

When a bit element with a value of "1" which has the largest number ofneighboring "1" bit elements would, if the binary value of the bitelement were a changed to a "0", also be the "0" bit element with thesmallest number of neighboring "1" bit elements, the "0" bit elementsand "1" bit elements are uniformly distributed throughout the patternarray, (that i s, the "0" and "1" bit elements are isotopicallydistributed in all directions) and consequently the bit elements form apattern with homogeneous attributes. The pattern array is subsequentlyused as a working binary pattern for choosing the threshold values ofthe dither template. Each element of the dither template is assigned athreshold value in accordance with the value of the bit element in acorresponding location of the working binary pattern and that bitelement's cluster or void characteristic.

There is advantageously a greater number of one binary value of the bitelements in the pattern array, and this bit element value is termed themajority bit element. Correspondingly, the other binary value bitelement is termed the minority bit element. A cluster is a term used todescribe a grouping of minority bit elements. A void is a term used todescribe a space between minority bit elements. A cluster filter and avoid filter are used during the creation of the pattern array and duringthe assignment of the thresholds to locate the largest cluster locationand the largest void location, respectively, in a binary pattern. Boththe cluster filter and the void filter advantageously employ a wraparound filtering property which effectively simulates neighboringpattern arrays to accurately locate clusters and voids, even whendealing with the outer edges of the pattern array.

In a preferred embodiment of the invention, during the creation of thepattern array, the cluster filter locates the minority bit element withthe highest number of neighboring minority bit elements (the largestcluster location). The minority bit element is removed from the largestcluster location and a majority bit element is inserted in its place.The void filter locates the majority bit element with the lowest numberof neighboring minority bit elements (the largest void location). Theremoved minority bit element is placed at the largest void location. Theprocess of moving minority bit elements from largest cluster locationsto largest void locations continues until the removal of a minority bitelement from the largest cluster location creates the largest voidlocation. At this point, the minority bit elements and the majority bitelements are uniformly distributed throughout the pattern array, and thepattern array is said to possess homogeneous attributes.

The pattern array having homogeneous attributes is used as a workingbinary pattern for determining the threshold values at each dithertemplate location. In one embodiment of the invention, the homogenouspattern array is stored in memory and copied to provide a working binarypattern. The cluster filter is iteratively applied to the working binarypattern to identify a minority bit element at the largest clusterlocation. The minority bit element is removed from the largest clusterlocation, a majority bit element is inserted in its place, and athreshold value is entered in the corresponding location of the dithertemplate. The threshold value entered is equal to the number of minoritybit elements remaining in the working binary pattern after the minoritybit element has been removed. The cluster filter continues to providelargest cluster locations and threshold values are assigned to theselocations in the dither template until no minority bit elements remainin the working binary pattern.

At this point in the process, the dither template has been assigned athreshold value at every location which originally contained a minoritybit element in the working binary pattern. The homogeneous pattern arrayis again copied to provide a working binary pattern. The void filter isiteratively applied to the working binary pattern, each time identifyinga majority bit element at the largest void location. The majority bitelement at the largest void location is removed, a minority bit elementis inserted in its place, and a threshold value is inserted in thecorresponding location of the dither template. The value of the insertedthreshold is equivalent to the number of minority bit elements in theworking binary pattern before the insertion of the new minority bitelement. The void filter continues to supply majority bit elementlocations and thresholds are entered in corresponding locations of thedither template until the number of minority bit elements is greaterthan one half the total amount of bit elements within the working binarypattern.

Because there are now more than one half of the original value ofminority bit elements in the pattern array, the bit element value whichwas previously the value of a minority bit element is now termed amajority bit element. Likewise, the bit element value which waspreviously a majority bit element is now termed a minority bit element.The cluster filter is again applied to the working binary pattern,identifying a minority bit element at the largest cluster location. Amajority bit element is inserted in its place, and a threshold value isentered in the corresponding location of the dither template. Thethreshold entered is a value equal to the number of majority bitelements in the working binary pattern before insertion of the latestmajority bit element. The cluster filter continues to provide largestcluster locations and threshold values continue to be entered in likelocations of the dither template until no minority bit elements remainin the working binary pattern. At this point, every dither templatelocation has been assigned a threshold value within the range 0 to(M×N)-1.

Because the threshold values were determined by locating voids andclusters in a pattern having a uniformly distributed pattern of minorityand majority pixels, the resultant dither template thresholds aretherefore uniformly distributed throughout the dither template. As aresult, an output image produced by an embodiment of the presentinvention which advantageously employs the wrap around filteringproperty referred to above, possesses few low frequency spatialcharacteristics. Thus, when the input image is tiled by dithertemplates, the output image will not suffer the regular and rectangularvisual effects encountered in prior art ordered dithering methods.

A void and cluster method of dithering embodying the invention permits asmall dither template to be replicated over a large input image whileensuring a homogeneous and visually pleasing output image. A simpleiterative search technique for locating clusters and voids minimizes theexpense of memory and hardware complexity in the generation of a dithertemplate.

Other objects, features and advantages of the invention will becomeapparent from a reading of the description of the preferred embodimentof the invention when taken in conjunction with the drawings in whichlike reference numerals refer to like elements in the several views.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an illustration showing the tiling of a prior art 4×4 dithermatrix over a 16×16 input image;

FIG. 2 is a block diagram illustrating an image processing system usinga dithering system in accordance with the present invention;

FIG. 3 is a block diagram illustrating the dither system of FIG. 2;

FIG. 4 is a block diagram illustrating a run time system used in thedither system of FIG. 3;

FIG. 5 is a block diagram illustrating a specific embodiment of a voidand cluster template generator for use in the dithering system of FIG.3;

FIG. 6 is a diagram illustrating the location of a minority bit elementin the largest cluster by a cluster filter and the location of amajority bit element in the largest void by a void filter;

FIG. 7 is a pictorial illustration of the wrap around property of thevoid and cluster filters used in the void and cluster template generatorof FIG. 5;

FIG. 8 is a flow diagram illustrating the steps performed to generate ahomogeneous pattern array for the void and cluster template generator ofFIG. 5;

FIG. 9 is a diagram illustrating the location of a minority bit elementby a cluster filter, the location of a majority bit element by a voidfilter and the movement of a minority bit element to a majority bitelement location in the pattern array by a binary pattern processor;

FIG. 10 illustrates an example of a pattern array before and after beingprocessed by the binary pattern processor;

FIGS. 11, 12 and 13 are flow diagrams illustrating the steps forassignment of threshold values to the locations in the dither matrix;

FIGS. 14 and 15 are output images rendered from the same input image,wherein FIGS. 14A and 15A are rendered using a prior art ordered dithermatrix and FIGS. 14B and 15B are rendered using the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

Referring now to FIG. 2, a monochrome image processing system 10 isshown to include an input device 12 such as a computer memory forstoring an input image 12a, an image processor 16 used to control theprocessing of the input image 12a, and an output device 18 such as aprinter, to display the input image 12a after processing as an outputimage 18a. Each of these devices provide outputs along lines 13a, 13b,13c, 13d, 15a, 15b, 15c and 19 to a dithering system 14. Ditheringsystem 14 translates input pixel data on line 13b, which may have up toX chrominance or luminance levels, into output pixel data on line 17,having up to Y chrominance or luminance levels.

Frequently, in transferring data between devices in an image processingsystem, the input device 12 is capable of representing more chrominanceor luminance levels than the output device 18. Signal "InputLevels" online 13a is an binary value signal representing the discrete number ofchrominance or luminance levels that the input device 12 is capable ofdisplaying. Signal "OutputLevels" on line 19 is an binary value signalwhich represents the discrete number of chrominance or luminance levelsthat the output device 18 is capable of displaying. The dithering system14 thus translates input pixels on line 13a, having InputLevelschrominance or luminance levels into output pixels on line 18a, havingOutputLevels chrominance or luminance levels (where OutputLevels is lessthan or equal to InputLevels), thereby providing an output image 18awhich is capable of being displayed on the output device 18 and that isvisually similar to the input image 12a.

(For reasons of clarity, chrominance or luminance levels may also betermed representation levels in the remainder of this specification).

By way of example, a 4×4 input image 12a, comprising 16 integer pixelvalues is shown in FIG. 2. As shown by input image 12a, the input device12 is capable of displaying 16 representation levels [numbered 0 . . .15 (a binary range between 0000 . . . 1111)]. However, the output device18 of this example is capable of displaying only two representationlevels (numbered 0 . . . 1), as shown in the resultant output image 18a.The dithering system 14 thus serves to translate the input image 12ainto a visually similar output image 18a.

The image processor 16 supplies to the dithering system 14 initialinformation including binary values indicating a number of rows and anumber of columns (on line 15a and line 15b respectively) of a dithermatrix which is used in the dithering system 14. An unordered binarysignal sequence on line 15c, supplied by the image processor 16, is usedto initialize memory within the dithering system 14, and will bediscussed in more detail later in the specification.

Referring now to FIG. 3, the dither system 14 is shown to include a voidand cluster template generator 20 which generates a M row by N columndither template for storage in a dither template memory 21. Each elementof the M by N dither template is an integer threshold value between 0and M×N-1. Binary values indicating the number of rows M and number ofcolumns N of the dither template are provided to the template generator20 by the image processor 16 (shown in FIG. 2) via lines 15a and 15brespectively. An arbitrary, binary pattern, preferably an unorderedbinary pattern is also provided by the image processor 16 to thetemplate generator 20 over line 15c to initialize a state within thetemplate generator 20. The unordered binary pattern comprises a sequenceof M×N "0" and "1" value bit elements, which is used by the templategenerator 20 in providing the dither template, as will be furtherdiscussed below. The arbitrary binary pattern can be any pattern butpreferably should have at least one "0" value bit element (void) or one"1" value bit element (cluster) within the pattern of otherwise oppositetype elements, i.e. clusters or voids, respectively.

Data in dither template memory 21 may be utilized by a plurality ofinput devices with various InputLevels, for generating an output imageon a plurality of output devices with various OutputLevels. Thus, oncethe time consuming process of generating the integer threshold values indither template memory 21 has been completed, the dither template neednot be regenerated during system operation.

The dithering system 14 further includes a dither system generator 24.After a threshold value has been stored in each of the M×N locations ofdither template memory 21, the dither template is transmitted fromdither template memory 21 over bus 22 to the dither system datagenerator 24.

Normalization of the integer threshold values in dither template memory21 occurs in the dither system data generator 24, which combinesthreshold values from dither template memory 21, InputLevels on line13a, OutputLevels on line 19, and the row number M and column number Nto provide a dither matrix. The formula for normalization used in thepreferred embodiment is shown as follows, where dt(x,y) refers to thethreshold value at the x,y location of dither template memory 21, Δ_(Q)refers to the distribution of InputLevels to OutputLevels (quantizationsteps), Δ_(dm) is the normalization factor, and dm(x,y) refers to thenormalized threshold value at the x,y location of dither matrix memory25: ##EQU1## (Equation Set I)

The dithering system 14 further includes a run time system 29 whichtranslates input pixels on line 15b having InputLevels representationlevels into output pixels on line 17 having OutputLevels representationlevels. The normalized threshold values of the dither matrix aretransmitted by the dither system data generator 24 over bus 24a to therun time system 29 and stored in dither matrix memory 25. In addition,the dither system data generator 24 provides a quantizer Look Up Table(LUT) containing mapping data, which is transmitted to the run timesystem 29 on line 24b and stored in quantizer LUT memory 27. Furtherinformation about the quantizer LUT will be discussed later in thisspecification. The run time system 24 utilizes data from dither matrixmemory 25 and quantizer LUT memory 27 to translate the input pixels online 13b into output pixels on line 17 at the real time pixel rate ofthe input device 12 (FIG. 2).

The normalized integer thresholds in dither matrix memory 25 and themapping data in quantizer LUT memory 27 may be used repeatedly in thedither system 14 provided that the image processing continues to occurbetween devices with like InputLevels and OutputLevels. If, however, anew input device with a different number of InputLevels or a new outputdevice with a different number of OutputLevels uses the dithering system14, the dither system data generator 24 must regenerate the data indither matrix memory 25 and the mapping data in quantizer LUT memory 27.

Referring now to FIG. 4, the normalized threshold values in dithermatrix memory 25 and the mapping data in quantizer LUT memory 27 areused by the run time system 29, which operates at an input pixel rate(dictated by the speed of the input device 12 (FIG. 2)). An input image12a (FIG. 2), stored in memory in the input device 12, is fed one pixelat a time on line 13b into the run time system 29 when an output imageis requested by the image processor 16 (FIG. 2). As each input pixel isfed from the input device 12 on line 13b into the run time system 29,the matrix address control unit 23 receives a NEXT PIXEL input on line13d from the input device 12, indicating that a new threshold valueshould be supplied from dither matrix memory 25 for the ditheringoperation. The matrix address control unit 23 subsequently supplies anew row address on line 23r and a new column address on line 23c forselecting a normalized threshold value from dither matrix memory 25. Aselected normalized threshold value is transmitted from the dithermatrix memory 25 on line 25a to an adder 26.

Advantageously, dither matrix memory 25 has fewer rows and columns thanthe input image 12a (FIG. 2), and the normalized threshold values ofdither matrix memory 25 are effectively tiled over the pixel arrayrepresenting the input image 12a. For example, for a 4×4 dither matrixreplicated over a 16×16 input image integer thresholds of the 4×4 dithermatrix are replicated over the 16×16 input image, with the first row ofnormalized dither matrix thresholds repeated over successive groups offour input image row locations. When all pixels from the first row ofthe input image 12a have been transmitted on line 13b and added to acorresponding normalized threshold on line 25a by adder 26 and providingcorresponding SUMs on line 26a to quantizer LUT memory 27, the inputdevice 12 asserts an End of Line (EOL) signal on line 13c.

When EOL is asserted, the matrix address control unit 23 addresses thesecond row of dither matrix memory 25 and that row of four normalizeddither thresholds is added by adder 26 to successive groups of fourinput pixels from the second row of the input image 12a, providingcorresponding SUMs on line 26a to quantizer LUT memory 27. When the lastrow of integer thresholds of the normalized dither matrix memory 25 hasbeen repeatedly added by adder 26 to pixels in a row of an input image12a, the matrix address control unit 23 effectively wraps around andagain addresses the first row of dither matrix memory 25 for normalizedthreshold values to add to the next row of pixels of the input image12a. This process continues until all rows of the input image 12a havebeen added by adder 26 to normalized thresholds from dither matrixmemory 25, and each SUM value has been transmitted on line 26a toaddress quantizer LUT memory 27.

As applied in the embodiment of the present invention, quantization is atechnique by which the distribution of the input representation levelswith respect to the output representation levels, measured in quantizingsteps Δ_(Q), is determined. For example, if there were 256 availableinput representation levels and 4 available output representation levelsthe Δ_(Q) is given by: Δ_(Q) =(256-1)/(4-1)=85 (as calculated usingEquation Set I above). Therefore, there are as many as 85 possible inputrepresentation levels mapped to each output representation level. In theembodiment of the present invention, the distribution of inputrepresentation levels is provided to be symmetric around each outputrepresentation level, as shown in the table below:

                  TABLE I                                                         ______________________________________                                        Input Representation                                                                          Output Representation                                         Level           Level                                                         ______________________________________                                        0-42            0                                                             43-127          1                                                             128-212         2                                                             213-255         3                                                             ______________________________________                                    

Therefore, in this example, quantizer LUT memory 27 is arranged having256 addressable entries, each entry containing an output chrominancelevel between 0 and 3. The generation and use of the quantizer LUT isdescribed in greater detail in co-pending application PD92-0296, ImagingSystem with Multi-Level Dithering Using Two Memories, by Ulichney etal., filed on even date with the present application.

Although the discussion has proceeded with reference to a monochromeimaging system, a color system could be implemented by increasing thenumber of run time systems 29. Therefore, for a 3 color video system(red, green and blue), there would be three separate run time systems,although all three systems would utilize the same dither matrix memory25 and quantizer LUT memory 27.

Referring now to FIG. 5, a binary pattern processor 50 which is used inconjunction with a cluster filter 60 and a void filter 70 to write apattern array 32 of black and white bit elements to a pattern arraymemory 30 are shown. The contents of the pattern array memory 30 arecopied in whole to a working binary pattern 42 (stored in working binarypattern memory 40) as necessary during operation. A dither templateprocessor 80 acts together with the cluster filter 60 and void filter 70on the bit elements in the working binary pattern 42 to produce an arrayof integer threshold values termed a dither template for storage indither template memory 21. The pattern array memory 30, the workingbinary pattern memory 40 and the dither template memory 21 each containM×N memory locations. Details of the interaction between the binarypattern processor 50, the pattern array memory 30, the working binarypattern memory 40, the dither template processor 80, the cluster filter60 and the void filter 70, which together function to provide integerthresholds for storage in dither template memory 21, are discussedbelow.

The assignment of integer threshold values to locations within dithertemplate memory 21 is related to the arrangement of bit elements withinthe pattern array 32. The pattern array 32 is initialized by inputtingan arbitrary unordered binary signal sequence of M×N `0` and `1` valuebit elements on line 15c, as mentioned above, to provide an unorderedbinary pattern in the pattern array 32. As mentioned above, while theinitial binary sequence is termed `unordered`, the arrangement of `0`value bit elements in the initial binary sequence may be random or mayrepresent a structured pattern. The initial arrangement of `0` and `1`value bit elements in the pattern array is modified by the binarypattern processor 50, as discussed below. The number of `1`-value bitelements may be equal to or greater than the number of `0`-value bitelements although preferably the number of `0` value bit elementsexceeds the number of `1` value bit elements. In the case where thereare fewer `1` value bit elements, the `1` bit elements are termedminority bit elements, and the `0` bit elements are termed majority bitelements.

The binary pattern processor 50 utilizes the void filter 70 and clusterfilter 60 to convert the initial unordered binary pattern of the patternarray 32 into a pattern having uniformly distributed `0` value and `1`value bit elements, that is the `0` and `1` value bit elements areisotopically distributed. The binary pattern processor 50 may beimplemented in hardware with programmable logic devices or throughsoftware.

The cluster filter 60 locates a minority bit element location in thetightest grouping (cluster) of minority bit elements ("1" value bitelements) in the pattern array 32 while the void filter 70 locates amajority bit element location in the largest spacing (void) betweenminority bit elements ("0"-value bit elements) in the pattern array 32.

Referring now to FIG. 6, by way of example, a random pattern 90 with 26minority bit elements is shown. This pattern 90 is stored in a 16column×16 row location of pattern array memory 30 (FIG. 5). The clusterfilter 60 filters the pattern 90 and determines the location of aminority bit element 92 (shown as the gray shaded pixel 92 in FIG. 6) inthe tightest cluster. The void filter 70 also filters the pattern 90 andproduces the location of the largest void, as shown by outlined pixel94.

Referring again to FIG. 5, the cluster filter 60 and void filter 70 canbe implemented by applying a modified convolution calculation to obtaina filter result F (x,y) for each bit element at each x, y location ofthe pattern array 32. The modified convolution calculation for a givenpattern array location (x,y), shown below, may be implemented in eitherhardware or software. The modified convolution below is performed foreach element of the pattern array 32 by both the void filter 70 and thecluster filter 60, where each neighboring minority element is equal to 1and each neighboring majority element is equal to 0. ##EQU2## where:p'=(M+x-p) modulo M

q'=(N+y-q) modulo N

and f(p,q) is a spatial domain function

(Equation Set II)

In the above equation, a weighted distribution, f(p,q) provides arelative contribution factor for each of the elements in the patternarray. The p,q indices are adjusted to p',q' to center the x,y index inthe weighted distribution f(p,q) and thereby accurately account for eachneighboring pixels contribution factor even when the x,y element islocated at an edge of the pattern array.

There are many candidate spatial-domain functions which can be used as"cluster filters" and "void filters". For the case of dithering tooutput devices in which the horizontal and vertical pixel spacings areequal, a symmetric two dimensional Gaussian function is preferably usedfor f(p,q), where both the p and q dimensions are to be treated equally.Dithering to output devices where the horizontal and vertical pixelspacings are not equal (an asymmetric pixel grid) can also beaccomplished by using an asymmetric two dimensional Gaussian functionfor f(p,q).

The symmetric Gaussian function utilized in the preferred embodiment isdefined by:

    f(p,q)=Ae.sup.-(p.spsp.2.sup./2σp.spsp.2.sup.+q.spsp.2.sup./2σq.spsp.2.sup.)

(Equation Set III)

Note that p² +q² is the distance from the location in question to theneighboring bit element, σ_(p) =σ_(q) =σ, and A is a constant, in apreferred embodiment σ is approximately 1.5 (in units of bit elementspacing).

The cluster filter 60 and void filter 70 each calculate a filter resultfor each bit element separately. This is accomplished by multiplying thevalue of each neighboring bit element (i.e. a "1" or a "0") by theGaussian function, thus taking into account the relative distance fromthe bit element in question to each neighboring bit element. The resultfor all neighboring bit elements is summed to form the filter result forthe bit element being evaluated. The minority bit elements are given thevalue of "1" for this calculation, while the majority bit elements aregiven the value of "0" for this calculation. Because only bit elementswith the value "1" will have a filter result that is not equal to "0",in essence it is only the minority bit elements which contribute to thefilter result. Thus, the minority bit element with the largest filterresult is the location of the largest cluster in pattern array memory30. Similarly, the majority bit element with the smallest filter resultis the location of the largest void in pattern array memory 30.

In addition, the void filter 70 and cluster filter 60 each have a wraparound property, as illustrated in FIG. 7 and apparent from the modulorelationship of p' and q' in the modified convolution equation (EquationSet II above). Thus, when determining the void or cluster characteristicof a certain pattern array location 112, when the span of the cluster orvoid filter (shown by circle 132) extends beyond the bounds of thepattern array 32, the filter wraps around to the opposite side of thepattern array 32, as indicated by the dashed lines 131a, 131b and 131c.This wrap around property effectively simulates neighboring patternarrays to accurately locate clusters and voids, even when dealing withthe outer edges of the pattern array. Thus the wrap around property ofthe cluster filter 60 and void filter 70 effectively hinders theemergence of regular and rectangular visual artifacts in the ditheredoutput image by eliminating seams at the edges of the dither array.

Creating a Dither Template

There are two processing steps performed by the void and clustertemplate generator 20 of FIG. 5 in the generation of integer thresholdvalues for storage in dither template memory 25. The first processingstep involves generating a pattern of uniformly distributed `0` valueand `1` value bit elements. The second processing step involvesgenerating a dither template of integer threshold values using theuniformly distributed, isotropic pattern. Each of these processing stepsis described below, with references to flow diagrams detailing the stepsnecessary to complete each process.

Generating a Uniformly Distributed Binary Pattern

Referring now to FIG. 8, a flow diagram displaying the logical operationof an embodiment of the binary pattern processor 50 of FIG. 5 is shown,and will be described with references to FIGS. 5,9 and 10, the lattertwo figures depicting typical outputs of the binary pattern processor50. As mentioned above, a binary signal sequence on line 15c is loadedinto pattern array memory 30. The binary signal sequence is arbitrary,it may be structured, but is preferably unordered, providing anunordered binary pattern 90 (FIG. 6) at step 101. By way of example, therandom pattern 90 (FIG. 6) with 26 minority bit elements in a 16×16pattern array 32 is used.

At step 102, the binary pattern processor 50 (FIG. 5) enables thecluster filter 60 a by asserting a NEXT CLUSTER signal on line 58 toinitiate location of the minority bit element location of the tightestcluster. The cluster filter 60 operates on the pattern array 32, toprovide the location of a minority bit element in the tightest cluster,and supplies the row and column location of that minority bit element tothe binary pattern processor 50 over the cluster row/col line 62 shownin FIG. 5. At step 103, the binary pattern processor 50 uses the clusterrow/col information to remove the minority bit element from the array 32and replace the removed minority bit element at the determined row/colwith a majority bit element. This is shown in FIG. 8 and shown in FIG.6, where the lightly shaded pixel 92 is the selected minority bitelement.

At step 104, upon insertion of the new majority bit element in thepattern array 32, the binary pattern processor 50 enables the voidfilter 70 by assertion of a NEXT VOID signal on line 56 to initiatelocation of a majority bit element in the largest void. The void filter70 also filters the pattern array 32, supplying a row and columnlocation of the largest void in the pattern array 32 to the binarypattern processor 50 over the void row/col line 72 as shown in FIG. 5and represented by the enclosed bit element 94 in FIG. 6. At step 105 inFIG. 8, the binary pattern processor 50 determines whether the locationsupplied by the void filter 70 is the same as the location most recentlysupplied by the cluster filter 60. If the two locations are determinedin step 105 not to be the same, then the binary pattern processor 50inserts a minority bit element in the pattern array 32 at the locationpreviously occupied by a void supplied by the void filter 70 at step106. This is shown by example in FIG. 9.

However, at step 107, if the two locations are the same, the binarypattern processor 50 restores the minority bit element at the locationof the pattern array 32 from which it was removed, i.e. the locationmost recently supplied by the cluster filter 60. That is, the removal ofthe minority bit is determined to have provided the largest void and theprocessing of the void and cluster filters to produce the pattern withhomogeneous attributes is "done". When the removal of a minority bitelement by the cluster filter 60 creates the largest void, the `0` valueand `1` value bit elements are uniformly distributed throughout thepattern array 32, (that is the elements are isotopically distributed inall directions) and the pattern array 32 is said to possess homogeneousattributes.

Referring now to FIG. 10, an example illustrating the translation of therandom input pattern of FIG. 6 into a uniform distribution of bitelements is shown. The 16×16 random input pattern in FIG. 6 is tiledfour times to cover an area of 32×32 pixels as indicated in 10A, wherethe edges of the tiles are indicated by the dashed lines. The outputfrom the binary pattern processor 50 is shown in FIG. 10B, where theedges of each of the uniformly distributed pattern arrays are alsoindicated by dashed lines. FIG. 10B illustrates the effectiveness of thewrap around property of the filters in producing a uniform distributionof bit elements with homogeneous attributes. Consequently, because theuniform distribution of bit elements within the pattern array wasdetermined by simulating neighboring pattern arrays using the wraparound property, when a pattern array is tiled over an input image, theboundaries between pattern arrays are indiscernible, as seen in FIG.10B.

Generating a Dither Template using the Uniformly Distributed PatternArray

Referring now to FIGS. 11-13, when the `0` value and `1` value bitelements are uniformly distributed throughout the pattern array 32, thebinary pattern processor 50 signals the dither template processor 80 byasserting a signal "DONE" on line 53. The dither template processor 80then begins a three phase process, acting together with the workingpattern array 42, the cluster filter 60, and the void filter 70, tosupply threshold values to each location of dither template memory 25.FIGS. 11, 12, and 13 illustrate the logical flow of each of the threephases of the dither template processor 80.

Phase I

In phase I, as shown in steps 201 through 203 of FIG. 11, the dithertemplate processor 80 loads binary bit elements from the pattern arraymemory 30 (the unordered pattern that was processed to provide a patternhaving homogeneous attributes), into the working binary pattern memory40. The dither template processor 80 counts the number of minority bitelements in the working binary pattern memory 40, and at step 202 storesthis value in a register "ONES". The value of ONES is decremented by thebinary value one at step 203, and assigned to the signal "THRESHOLD" online 85 of FIG. 5. For example, using the pattern array of FIG. 6, whichhas 26 minority bit elements in each pattern array, the value of "ONES"is equal to 26, and the original "THRESHOLD" value is 25.

At the start of Phase I, although the pattern array possesseshomogeneous attributes, the filter result of each bit element is notidentical. As shown in steps 205 through 207 of FIG. 11, upon assertionof the NEXT CLUSTER signal on line 58 by the dither template processor80 in FIG. 5, the cluster filter 60 operates on the bit elements inworking binary pattern memory 40, calculating a filter result for eachbit element, locates a minority bit element location of the tightestcluster, and supplies that cluster row/col location over line 62 to thedither template processor 80 in step 205. The first bit element locatedby cluster filter in Phase I will be the last bit element located by theworking binary pattern processor 50, i.e, the minority bit element inthe largest cluster which when removed produced the largest void. Thedither template processor 80 replaces the minority bit element existingat that location with a majority bit element in step 206, and in step207 enters the value of THRESHOLD (25 in this example) over line 85 inthe corresponding location of the dither template memory 25. The valueof THRESHOLD is then decremented by one in step 208.

The cluster filter 60 continues calculating the filter result for eachbit element while supplying minority bit element cluster row/collocations over line 62 to the dither template processor 80, and theprocessor 80 continues to remove minority bit elements from the suppliedlocation on line 62 and decrements the THRESHOLD value by one (steps 205through 208 in FIG. 10). This process is repeated until THRESHOLD=0, atwhich point there are no remaining minority bit elements in the workingbinary pattern memory 40, and 26 locations of dither template memory 25of this example have been assigned threshold values between 0 and 25.The dither processor 80 then proceeds into the second phase ofoperation.

Phase II

In phase II, as shown in FIG. 12 in step 209, the dither templateprocessor 80 again loads the working binary pattern memory 40 withvalues from pattern array memory 30. In step 210 the THRESHOLD signal isassigned the value of ONES (26 in this example). As shown in steps 212through 215 of FIG. 12, upon assertion of the NEXT VOID signal over line56 by the dither template processor 80, the void filter 70 filters theworking binary pattern 42 by calculating the filter result for each bitelement, locates a majority bit element location of the largest void,and in step 212 supplies the row/col location of that void over line 72to the dither template processor 80. The dither template processor 80replaces the majority bit element at that void row/col location with aminority bit element in step 213, and in step 214 enters the value ofTHRESHOLD (26 in this example) over line 151 in the correspondinglocation of dither template memory 25. The value of the THRESHOLD signalis then incremented by one in step 215, making the THRESHOLD signal ofthe example equal to 27. The void filter 70 continues calculating filterresults for each element of the working binary pattern, supplyingmajority bit element void row/col locations on line 72 to the dithertemplate processor 80, while the processor 80 continues adding minoritybit elements at the supplied location of line 72, and incrementingTHRESHOLD (steps 212 through 215 in FIG. 12) until THRESHOLD>=half thetotal number of locations in the dither template memory 25. In thisexample, wherein the dither template contains 16×16 (256) locations,threshold values between 26 and 127 have been assigned to locationswithin the dither template memory 25 by the end of phase II. The workingbinary pattern 42 is preserved for use in phase III.

Phase III

At this point (because more than half the bit elements have the originalminority bit element value, `1` in the preferred embodiment) theprevious characterization of "minority bit element" is reversed from thebit element value `1` to the bit element value `0`, as shown in step 216of FIG. 13, and the dither processor 80 proceeds into the third phase ofoperation. Therefore, the cluster filter, which originally searched for`1`-value bit elements searches for `0` value bit elements in phase III.Likewise, the void filter, which originally searched for `0`-value bitelements searches for `1` value bit elements in phase III. It should benoted, however, that although the cluster filter 60 is searching for `0`value bit elements, the `0` value bit element, because it is theminority bit element, will be assigned a `1` value for the modifiedconvolution calculations. Likewise, although the majority bit elementsnow have an bit element value of `1`, because they are a majority bitelement, they will be assigned a `0` value for modified convolutioncalculations. Thus, the cluster filter 60 and void filter 70 search forthe minority and majority bit elements regardless of their bit elementvalues.

As shown in steps 218 through 221 of FIG. 13, upon assertion of the NEXTCLUSTER signal over line 159 by the dither template processor 80, thecluster filter 60 filters the working binary pattern 42, locates aminority bit element location of the tightest cluster, and in step 218supplies the cluster row/col location over 62 to the dither templateprocessor 80. The dither template processor 80 replaces the minority bitelement at that cluster row/col location with a majority bit element instep 219, and in step 220 enters the existing value ((M×N)/2, or 128 inthe current example) of the THRESHOLD signal 151 in the correspondinglocation of dither template memory 25. The value of the THRESHOLD signalis then incremented by one ((M×N)/2+1, or 129 in the current example) instep 221. The cluster filter 60 continues to calculate filter resultsfor each bit element and supply minority bit element cluster row/collocations over line 62 to the dither template processor 80, while theprocessor continues to remove minority bit elements and insert majoritybit elements, and increment THRESHOLD (steps 218 through 221 in FIG. 12)until THRESHOLD=M×N (256 in the current example), at which point thereare no remaining minority bit elements in the working binary pattern 42,and consequently every location in dither template memory 25 has beenassigned a threshold. In phase III, therefore, threshold values between128 and 255 were assigned to dither template memory 25.

At this point, dither template memory 25 has been generated for usewithin the dithering system 14 of FIG. 3. The thresholds of the dithertemplate memory 25, because they were generated from a uniformlydistributed pattern of bit elements, are also uniformly distributedthroughout dither template memory 25. Due to the uniform distribution ofthresholds within the dither template memory 25, the resultant outputimage generated using dither template memory 25 possesses minimal lowfrequency spatial characteristics. In addition, a small dither template(32×32 for example) may be used in the dithering system withoutfacilitating the regular visual artifacts commonly found in ordereddithering.

Referring now to FIGS. 14A and 14B, two output images displaying a "grayscale" are shown. The output images are generated from a common inputimage using a system as described with reference to the dithering system14 of FIG. 3. The gray scale illustrates the range of various colorlevels that the output device is able to simulate utilizing only blackand white bit elements. In the gray scale of FIG. 14A, provided using aprior art ordered dither template, various distracting visual patternscan be seen as the color level varies from white to black. The visualpatterns are a result of the ordered structure of the prior art dithermatrix.

Distracting visual artifacts however are insignificant in the gray scaleof FIG. 14B due to the uniform distribution of thresholds in a dithertemplate generated as described with reference to the embodiment of theinvention illustrated by FIGS. 5-13.

Referring now to FIGS. 15A and 15B, two output images generated usingthe same input image are shown. The visual artifacts inherent in theprior art ordered dithering method due to the ordered structure of thedither matrix used to render FIG. 15A detract from the rendition of theinput image by adding regular structures to the output image.

In contrast, as shown in FIG. 15B, the output image rendered by anembodiment of the invention employing a dither template as describedwith reference to FIGS. 5-13 has few artifacts. This is due both to theuniform distribution of the thresholds within the dither template aswell as the wrap-around property of the void and cluster filters, whichserve to eliminate visible edges as the dither template is tiled overthe image. Subsequently, a significantly more accurate and visuallypleasing re-creation of the texture and definition of the input image isrendered on the output device.

While there has been shown and described a preferred embodiment of thisinvention, it is to be understood that various adaptations andmodifications may be made within the spirit and scope of the inventionas defined by the claims.

What we claim is:
 1. An apparatus comprising:a memory device havinglocations corresponding to M rows and N columns of elements, saidelements forming a binary bit pattern comprising majority type elementsand minority type elements; means for iteratively selecting and movingsaid minority type elements and said majority type elements betweenelement locations within said pattern memory device, said minority typeelements selected in relation to neighboring minority type elementsaccording to a first spatial characteristic, and said majority typeelements selected in relation to neighboring minority type elementsaccording to a second, different spatial characteristic, until saidminority type elements and said majority type elements have beenuniformly distributed to locations within said pattern memory device toprovide a modified pattern of first and second type bit elements havinghomogeneous attributes.
 2. The apparatus of claim 1 further comprisingmeans for providing a modified convolution result for each element ofsaid pattern, including:multiplication means for multiplying a binaryelement value of elements neighboring said selected element by a spatialdomain function to generate a filter result; and summing means foradding said filter result of each of said neighboring elements toproduce said modified convolution result for said element.
 3. Theapparatus of claim 1, wherein said first spatial characteristic and saiddifferent spatial characteristic are respective modified convolutionresults for each element in said pattern memory device.
 4. The apparatusof claim 3, wherein said first spatial characteristic is a highestmodified convolution result of said minority type elements with relationto said modified convolution results of other minority type elementswithin said pattern memory device.
 5. The apparatus of claim 3, whereinsaid second, different spatial characteristic is a lowest modifiedconvolution value of a majority type element with relation to saidmodified convolution results of each of other majority type elementswithin said pattern memory device.
 6. The apparatus of claim 2, whereinsaid spatial domain function comprises an M×N distribution of weightedvalues used to determine a relative contribution of each of saidneighboring elements to the modified convolution result for eachelement.
 7. The apparatus of claim 2, wherein said means for calculatingsaid modified convolution result further comprises:means for calculatingthe indices of said pattern element for which said modified convolutionresult is provided in a weighted distribution of values havingcorresponding indices, and for adjusting selected indices of saidweighted distribution for portions of said weighted distribution fallingoutside of said pattern.
 8. The apparatus of claim 7, wherein said meansfor adjusting further comprises:means for wrapping around said portionsof said weighted distribution falling outside of said pattern intocorresponding opposite portions of said pattern.
 9. An apparatuscomprising:means for storing a binary bit pattern having M rows and Ncolumns comprising first type bit elements and second type bit elements,wherein one of said first and said second type bit elements is amajority type bit element, and the other one of said first and saidsecond type bit element is a minority type bit element; means forstoring a dither template having M rows and N columns of integerthreshold values in a template memory device having corresponding M rowsand N columns of element locations; means for iteratively selecting aminority type element from said corresponding location from saidpattern, said minority type element at said corresponding locationselected in relation to neighboring minority type elements according toa first spatial characteristic, said means for iteratively selecting aminority type element further comprising:means for replacing saidminority type element at said corresponding memory location with amajority type element to provide a second pattern array, andconcurrently assigning a threshold value to a corresponding elementlocation of said template memory; and means for iteratively selecting amajority type element from said pattern, said majority type elementselected in relation to neighboring minority type elements according toa second, different spatial characteristic, said means for iterativelyselecting a majority type element further comprising:means for replacingsaid majority type element at said corresponding pattern location with aminority type element to provide a third modified pattern, andconcurrently assigning a threshold value to a corresponding elementlocation of said template memory.
 10. The apparatus of claim 9 furthercomprising means for providing a modified convolution result for eachelement of said pattern, including:multiplication means for multiplyingbinary values of said elements neighboring said selected element by aspatial domain function to generate a filter result; and summing meansfor adding said filter result of each of said neighboring elements toproduce said modified convolution result for said element.
 11. Theapparatus of claim 10, wherein said first spatial characteristic andsaid different spatial characteristic are respective modifiedconvolution results for each element in said pattern memory device. 12.The apparatus of claim 10, wherein said first spatial characteristic isa highest modified convolution result of said minority type elementswith relation to said modified convolution results of other minoritytype elements within said pattern.
 13. The apparatus of claim 10,wherein said second, different spatial characteristic is a lowestmodified convolution value of a majority type element with relation tosaid modified convolution results of each of other majority typeelements within said pattern.
 14. The apparatus of claim 10, whereinsaid spatial domain function comprises an M×N distribution of weightedvalues used to determine a relative contribution of a neighboringelement to the modified convolution result for each element.
 15. Theapparatus of claim 10, further comprising:means for calculating theindices of said pattern element for which said modified convolutionresult is provided in a weighted distribution of values havingcorresponding indices, and for adjusting selected indices of saidweighted distribution for portions of said weighted distribution fallingoutside of said pattern.
 16. The apparatus of claim 15, wherein saidmeans for adjusting further comprises:means for wrapping around saidportions of said weighted distribution falling outside of said patterninto corresponding opposite portions of said pattern.
 17. An apparatuscomprising:a dithering system responsive to input image pixels from aninput device having a first plurality of representation levels,including a memory for storing a dither template comprising an M by Narray of elements representing a uniform distribution of unique integerthreshold values having homogeneous attributes; means, responsive tosaid first plurality of representation levels, a second plurality ofrepresentation levels of an output device, and to said threshold valuesof said dither template, for providing a normalized dither matrixcomprising normalized threshold values; adding means for adding saidinput image pixel representation levels to said normalized thresholdvalues to provide summation signals; quantizer means for mapping saidsummation signals to said second plurality of representation levels toprovide output pixels; and means for storing said output pixels.
 18. Theapparatus of claim 17, further comprising an input device to store aninput image comprising a plurality of input image pixels having saidfirst plurality of representation levels.
 19. The apparatus of claim 17,further comprising means for converting said output pixels to provide arepresentation of said input image on an output device.
 20. Theapparatus of claim 17, wherein said dithering system furthercomprises:means for storing a pattern having M by N element locations,said elements of said pattern comprising an initial binary pattern offirst type bit elements and second type bit elements, wherein eithersaid first type bit element or said second type bit elements aremajority type elements and wherein said other one of said first type bitelements or said second type bit elements are minority type elements,wherein said majority type elements and said minority type elements arerelated by first and second spatial characteristics.
 21. The apparatusof claim 20, further comprising:means for iteratively selecting andmoving said minority types and majority types between element locationswithin said pattern, said minority type element location selected inrelation to neighboring minority type elements according to said firstspatial characteristic, and said majority type element location selectedin relation to neighboring minority type elements according to saidsecond, different spatial characteristic, until said first and majoritytypes have been moved to element locations to form a modified patternwith homogeneous attributes.
 22. The apparatus of claim 20 furthercomprises:means for selecting a minority type element location of saidpattern, said minority type element location selected in relation toneighboring minority type elements according to said first spatialcharacteristic, including means for replacing said minority type elementwith said majority type element and concurrently assigning a uniquethreshold value to a corresponding integer location of said dithertemplate; and means for selecting a majority type element location ofsaid pattern, said majority type element location selected in relationto neighboring minority type elements according to said second,different spatial characteristic, including means for replacing saidmajority type element with said minority type element and concurrentlyassigning another unique threshold value to a corresponding location ofsaid dither template.
 23. The apparatus of claim 20, further comprisingmeans for providing a modified convolution result for each element ofsaid pattern, including:multiplication means for multiplying the binaryelement value of said neighboring elements by a spatial domain functionto generate a filter result; and summing means for adding said filterresult of each of said neighboring elements to produce said modifiedconvolution result for said element.
 24. The apparatus of claim 20,wherein said first spatial characteristic and said second, differentspatial characteristic are respective modified convolution results foreach element in said pattern.
 25. The apparatus of claim 20, whereinsaid first spatial characteristic is a highest modified convolutionvalue of a minority type element relative to said modified convolutionvalues of each of said minority type elements of said pattern.
 26. Theapparatus of claim 20, wherein said different spatial characteristic isa lowest modified convolution value of a majority type element relativeto said modified convolution values of each of said elements majoritytype elements of said pattern.
 27. The apparatus of claim 20, whereinsaid spatial domain function comprises an M×N distribution of weightedvalues used to determine a relative contribution of a neighboringelement to the modified convolution result for each element.
 28. Theapparatus of claim 20, further comprising:means for calculating theindices of said pattern element for which said modified convolutionresult is provided in a weighted distribution of values havingcorresponding indices, and for adjusting selected indices of saidweighted distribution for portions of said weighted distribution fallingoutside of said pattern.
 29. The apparatus of claim 28, wherein saidmeans for adjusting further comprises:means for wrapping around saidportions of said weighted distribution falling outside of said patterninto corresponding opposite portions of said pattern.
 30. A methodcomprising the steps of:a. storing in a memory device a pattern having Mrows and N columns of locations, said pattern comprising a binarypattern of first type bit elements and second type bit elements, whereinone of either said first type or second type bit elements are majoritytype elements, and wherein the other one of said first type or secondtype bit elements are minority type elements; and b. iterativelyselecting and moving said minority type elements and said majority typeelements in said memory device between memory locations, wherein saidminority type element location in memory is selected in relation toneighboring minority type elements according to a first spatialcharacteristic and said majority type element location in memory isselected in relation to neighboring minority type elements according toa second, different spatial characteristic; and repeating said step ofiteratively selecting and moving until said minority type elements andmajority type elements are uniformly distributed at pattern locations insaid memory device to provide a modified pattern having homogeneousattributes.
 31. The method of claim 30, further including the step ofcalculating a modified convolution result for each element of saidpattern, comprising the steps of:a. multiplying the binary element valueof each of said neighboring elements by a spatial domain function togenerate a filter result for each of said neighboring elements; and b.summing said filter result of said neighboring elements to produce saidmodified convolution result of said element.
 32. The method of claim 31,wherein said first spatial characteristic and said second, differentspatial characteristic are determined by calculating a modifiedconvolution result for each element in said pattern.
 33. The method ofclaim 31, wherein said first spatial characteristic is a highestconvolution result of said minority type elements with relation to saidconvolution results of the other minority type elements of said pattern.34. The method of claim 31, wherein said second, different spatialcharacteristic is a lowest convolution result of said majority typeelements in relation to said convolution results of the other majoritytype elements of said pattern.
 35. The method of claim 31, wherein saidspatial domain function comprises an M×N distribution of weighted valuesused to determine a relative contribution of a neighboring element tothe modified convolution result for each element.
 36. The method ofclaim 31, further comprising the step of:calculating the indices of saidpattern element for which said modified convolution result is providedin a weighted distribution of values having corresponding indices, andadjusting selected indices of said weighted distribution for portions ofsaid weighted distribution falling outside of said pattern.
 37. Themethod of claim 36, wherein said step of adjusting further comprises thestep of:wrapping around said portions of said weighted distributionfalling outside of said pattern into corresponding opposite portions ofsaid pattern.
 38. A method comprising the steps of:a. storing in amemory device a pattern having M rows and N columns of locations, saidpattern comprising a binary pattern first type bit elements and secondtype bit elements, wherein said one of either said first type bitelements or said second type bit elements are majority type elements,and wherein the other one of said first type bit elements or said secondtype bit elements are minority type elements; b. selecting a minoritytype element location from said pattern, said minority type elementlocation selected in relation to neighboring minority type elementsaccording to said first spatial characteristic, including replacing saidminority type element with a majority type element and concurrentlyassigning a unique threshold value to a corresponding location of saiddither template until no minority type elements remain in said pattern;and c. selecting a majority type element location from said pattern,said majority type element location selected in relation to neighboringminority type elements according to said second, different spatialcharacteristic, including replacing said majority type element with saidminority type element and concurrently assigning another uniquethreshold value to a corresponding location of said dither templateuntil the number of minority type elements in said pattern exceeds thenumber of majority type elements in said pattern.
 39. The method ofclaim 38 further comprising the steps of:a. evaluating the bit type ofthe majority type element and the minority type element, wherein thetype bit element of greatest number in said pattern is a majority typeelement, and the type bit element of least number in said pattern is aminority type element; and b. selecting a minority type element locationfrom said pattern, said minority type element location selected inrelation to neighboring minority type elements according to said firstspatial characteristic, including replacing said minority type elementwith said majority type element and concurrently assigning anotherunique threshold value to a corresponding location of said dithertemplate until unique threshold values have been assigned to each dithertemplate location.
 40. The method of claim 38, further including thestep of calculating a modified convolution result for each element ofsaid pattern, comprising the steps of:a. multiplying the binary elementvalue of each of said neighboring elements by a spatial domain functionto generate a filter result for each of said neighboring elements; andb. summing said filter result of said neighboring elements to producesaid modified convolution result of said element.
 41. The method ofclaim 40, wherein said first spatial characteristic and said second,different spatial characteristic are determined by calculating amodified convolution result for each element in said pattern.
 42. Themethod of claim 40, wherein said first spatial characteristic is ahighest convolution result of said minority type elements with relationto said convolution results of the other minority type elements of saidpattern.
 43. The method of claim 40, wherein said second, differentspatial characteristic is a lowest convolution result of said majoritytype elements in relation to said convolution results of the othermajority type elements of said pattern.
 44. The method of claim 40,wherein said spatial domain function comprises an M×N distribution ofweighted values used to determine a relative contribution of aneighboring element to the modified convolution result for each element.45. The method of claim 40, further comprising the step of:calculatingthe indices of said pattern element for which said modified convolutionresult is provided in a weighted distribution of values havingcorresponding indices, and adjusting selected indices of said weighteddistribution for portions of said weighted distribution falling outsideof said pattern.
 46. The method of claim 45, wherein said step ofadjusting further comprises the step of:wrapping around said portions ofsaid weighted distribution falling outside of said pattern intocorresponding opposite portions of said pattern.
 47. The method of claim31, wherein said step of providing a modified convolution result foreach element of said pattern includes the step of calculating: ##EQU3##wherein F (x,y) provides said modified convolution result of saidelement at location x,y of said pattern, and p and q are indices to aspatial domain function, and adjusting p and q to provide p' and q'respectively.
 48. The method of claim 46 wherein the step of adjusting pand q to provide p' and q' is calculated by the respective equations:

    p'=(M+x-p) modulo M

    q'=(N+y-q) modulo N


49. The method of claim 46, wherein said spatial domain function is asymetric Gaussian function, given by the equation:

    f(p,q)=Ae.sup.-(p.spsp.2.sup./2σp.spsp.2.sup.+q.spsp.2.sup./2σq.spsp.2.sup.)

wherein that p² +q² is the distance from said element for which F(x,y)is provided to a neighboring element, σ_(p) =σ_(q) =σ, and A is aconstant.